define(['app', 'booksService'], function (app) {
    app.register.controller('homeCtrl', function ($scope, $http, booksService, $stateParams) {
        console.log($stateParams.type);
        $http.get("/data")
            .success(function (res) {
                $scope.key = res.key;
                console.log($scope.key);
            });
    });
});